


function ProcessEventListResult (data)
{ 
   // alert (window.loggedinuser.PERM_BROWSE)
    if (window.loggedinuser.PERM_BROWSE)
    {
        return ProcessEventListResultExtra (data);
    }
    return '<table width=500 height=500 id="dcelisttable"><tr><td align=center><label class=disabled disabled>Unable to browse events with current permissions</label></td></tr></table>';
}

var select_row = '<div style="margin-bottom:5px">&nbsp;Select: <a onclick="select_all()" href="javascript:void(0)">all</a>, ';
select_row += '<a onclick="select_none()" href="javascript:void(0)">none</a>, ';
select_row += '<a onclick="select_range()" href="javascript:void(0)">range</a>, ';
select_row += '<a onclick="select_inverse()" href="javascript:void(0)">inverse</a></div>';

            
var button_row  = function(id)
{ 
    var br='';
    br += '<input type="button" onclick="ToggleSidebarState()" value="'+(Controller.SidebarState==1?'&#171;':'&#187;')+'">';
    br += '<input type="button" value="Delete" onclick="BeginBulkExecute(4)"> ';
    br += '<input type="button" value="Feature" onclick="BeginBulkExecute(0)"> ';
    br += '<input type="button" value="Approve" onclick="BeginBulkExecute(2)"> ';
    br += '<select onchange="BeginBulkExecute(this.value, '+id+')">';
    br += '<option value="-1">More Actions'; 
    br += '<option value="1">Set as Not Featured';
    br += '<option value="3">Set as Not Approved';
    br += '<option value="5">Add to invoice';
    br += '<optgroup label="User-defined Reports">';
	for (var x in window.reports)
	{
		br += '<option ' + (window.report==x?'selected':'') + ' value="r-'+x+'">'+window.reports[x].title+'';
	}
    br += '</optgroup>';
    br += '</select> ';
    return br; 
}
            
function ProcessEventListResultExtra (data)
{ 
        
	registerTemplate ('EventListSelectedRow', EventListSelectedRow);
	registerTemplate ('EventListNormalRow', EventListNormalRow);

    var dw=getElement ('dworkspace');                                   
    if (window.http.readyState == ReadyState.DONE)                                              
    {        
        var button_row_top = function()
        {

            var pg=0;
            var pend=0; 
            var br='';
            
            br += '<table width="100%" cellpadding="2" cellspacing="0"><tr>';
            br += '<td>';
            br += button_row (this.id); 
            
            if (window.invoice.events.length > 0)
            {
                br += '&nbsp;View <a href="javascript:void(0)" onclick="InvoicePageEvent.invoke();">invoice</a>';
            } 
            
            br += '</td>';
            br += '<td align=right>';
			
			var count = this.rows.length;
			var limit = Math.min(count, this.pagesize);
            if (this.rows.length > this.pagesize)
            {
                br += ' ';
                br += '<a title="Display all '+this.rows.length+' events" href="javascript:void(0)" ';
                br += 'onclick="';
                br += 'EventDataGridChangeRange ('+this.id+');"';
                br += ' class=small>Show ' + (this.showall?('up to '+this.pagesize+' events &#171;'):'all &#187;') + '</a>&nbsp;';
				
				if (!this.showall)
				{ 
					br += 'Show at most <!--<input '+(this.showall?'disabled':'')+' class=flat ';
					br += ' size="2" value="'+this.pagesize+'" onchange="EventDataGridSize(' + this.id + ',this.value)">--> '; 
					
					br += '<select title="The default page size is now '+this.pagesize+'.\nYou can reset the default page size on the Settings page" onchange="EventDataGridSize(' + this.id + ',this.value)">';
					for (var k=5;k<limit+5;k+=5)
					{
						if (count % this.pagesize != 0 && count > k - 5 && count < k)
						{
							br += '<option selected value="'+count+'">'+count+'</option>';
						}
						br += '<option ' + (k==this.pagesize || k == count ?'selected':'') + ' value="'+k+'">'+k+'</option>';
					}
					br += '</select> events&nbsp;';  
				}
				br += '<select '+(this.showall?'disabled':'')+' onchange="EventDataGridPage(' + this.id + ',this.value)">';
				
				for (var k=0;k<this.rows.length;k+=this.pagesize)
				{
					pg++;
					pend=k+this.pagesize<this.rows.length?k+this.pagesize:this.rows.length;
					br += '<option value="' + pg + '" ' + (pg==this.page?'selected':'') + '>' + (k+1) + '-' + pend;
				}
				br += '</select>';
				br += ' of '
            
            }
            br += ' ' + this.rows.length + ' events'; 
			
            br += '&nbsp;&nbsp;</td>';
            br += '</tr>';
            br += '</table>';
            
            return br +  select_row;
            
        }
        
        
        var button_row_bottom = function()
        {
                        
            var br='';
            br += '<table width="100%" cellpadding="2" cellspacing="0"><tr>';
            br += '<td>';
            br += button_row (this.id); 
            br += '</td>';
            br += '<td align=right>'; 
            br += '</td>';
            br += '</tr>';
            br += '</table>';
            
            return select_row  + br; 
        }
        
        
        var d=new dgrid();
        d.key="elisttable";
        d.headertransform = button_row_top;
        d.footertransform = button_row_bottom;
		d.firstrowtransform = function () {	
			return '<tr><td colspan="7" style="padding:2px;color:#333;font-size:9pt" class=datarow bgcolor="#FFFFCC">' + Toolbar.caption() + '</td></tr>';
		}
        d.showcolumns = window.gridview=='invoice';
        d.query = Controller.createQueryString;
        d.transform = function (row)
        { 
            // local function pointers;
			var LocaltimeInput = timeInput;
            var LocaldateInput = dateInput;
            var LocalcreateHref = Controller.createQueryString;
            var LocalGetUserById = GetUserById;
            var LocalfieldChk  = Controller.has;
            var LocalCalendarscope = Calendar.scope;
            var report = Controller.QueryString['report'];
            row.re = function (x) { if (this[x]) return this[x]; return '<font color=red>No value for ' + x + '</font>'; }
            var chosen=row['ID'].toString()==this.selected.toString() || window.gridview=='expanded';
            if (!row['Featured']) row['Featured']=0;
            var other= -(row['Featured']-1);
            var comments=row['Comments'];
            if (!comments) comments='';
            var css=chosen?'bluerow':'datarow'; 
            var tb,rowmask = chosen ? 'EventListSelectedRow' : 'EventListNormalRow'; 
			
			if (window.report)
			{
				rowmask = window.reports[window.report].title + new Date().getTime();
				registerTemplate (rowmask, '<tr><td>' + window.reports[window.report].templatebody.replace ('<p>&nbsp;</p>','') + '</td></tr>');
			}
			 
			 
            var object = { 'template' : rowmask, 
                            'shortcomment' : comments.substr(0,85 - row.re('EventName').length), 
                            'gridid' : this.id, 
                            'other' : other, 
                            'star' : row['Featured']==1?Controller.staron:Controller.staroff, 
                            'class' : css, 
                            'cspan' : 7, 
                            'href' : './#' + this.query ({'key' : row['ID']}), //'report/' + report + '/event/' + row['ID'],
							'RecurseEndDate' : '', 
							'Comments' : '' 
						}  
            row.EventName = row.EventName.replace ('&pos;', "'");
			
			
			var mask = {
				CreateDate : function (x) { return ' on ' + LocaldateInput(x) },
				ApproveLogin : function (id) 
				{  
					if (id)
					{
						var us=LocalGetUserById(id); 
						return '<br>' + (us ? (us['FirstName'] + ' ' + us['LastName']) : 'Not approved');
					}
				},
				ApproveDate : function (x) { return ' approved on ' + LocaldateInput (x);  },
				SetupStartTime : function (x) { return ' Setup Start: ' + LocaltimeInput (x) + ' <br>';  },
				SetupEndTime : function (x) { return ' Setup End: ' + LocaltimeInput (x) + ' <br>';  },
				Duration : function (x) { return ' Event will last ' + x + ' hours<br>';  },
				Attendees : function (x) { return ' Attendees: '+x+'<br>'; }, 
				FullName : function (x) { return ' by '+x+''; },
				RoomName : function (x) { return x.replace ('&amp;',"&").replace ('&pos;',"'"); },
				Description : function (x) { return ' <br>Description: '+x+'<br>'; } ,
				Comments : function (x) { if (x.indexOf('<') < 0 || x.indexOf('>') < 0) return x; var ch,a=true,o=[];for (var i=0;i<x.length;i++) { ch=x.substr(i,1);
				     if (ch=='<') a=false
					 else if (ch=='>') a=true;
					 else if (a) o.push(ch);
				} return o.join('').replace(/(&pos;)/g,"'");} ,
				CustomDate : function (x) { return ' <br><font color="red">function undergoing maintenance...</font><br>'; } 
			}
			 
			var c;
			for (var x in row) 
            {
				if (LocalfieldChk (x))
				{
					if (mask[x]) { c=mask[x]; object[x] = c (row[x]);}
					else if (x.indexOf ('Date') > 0 && row[x] && row[x].length > 0) object[x] = LocaldateInput (row[x]);
					else if (x.indexOf ('Time') > 0 && row[x] && row[x].length > 0) object[x] = LocaltimeInput (row[x]);
					else if (x=='EventName') object[x] = row['RecurseEndDate'] && row['RecurseEndDate']!='' ? '<b>' + row[x]+ '</b>' : row[x];
					else object[x]=row[x]; 
				} 
				else if (x=='ID') object[x]=row[x]; 
				else object[x]='&nbsp;';
            } 
			object['shortcomment'] = object.Comments.substr(0,85 - object.EventName.length);
			object.Calendarscope='&nbsp;'; 
			if (LocalfieldChk ('CustomDate'))
			{ 
				if (Controller.EventDateMask)
				{
					object.Calendarscope = Controller.EventDateMask.draw (row.ID);
				}
			} 
			if (Controller.EventRoomMask)
			{
				object.RoomName = Controller.EventRoomMask.draw (row.ID);
			}
            return Factory.write (object);  
        }
        
        
        
            if (window.dom.loadXML (window.eventlistxml))
            {
				Controller.EventDateMask = {
					    draw:function (id)
						{
							var htm=['Event occurs on:'], key = 'k' + id; 
							if (this[key])
							{
							    for (var x in this[key])
								{
									htm.push ( '&nbsp;&nbsp;' + dateInput(this[key][x]) );
								}
							}
							return htm.join ('<br>');
						}
					};
				Controller.EventRoomMask = {
					    draw:function (id)
						{
							var htm=[], key = 'r' + id; 
							if (this[key])
							{
							    for (var x in this[key])
								{
									htm.push ( this[key][x] );
								}
							}
							return htm.join (', ');
						}
					};		
                var key, ns = null;
                var nodes = null;
                var rs = window.dom.getElementsByTagName ('rs');
                var size = rs.length;
                for (var j=0;j<size;j++)
                { 
				    var cs = rs[j].getElementsByTagName ('rs');
					 
					for (var k=0;k<cs.length;k++)
					{
						if (cs[k].getAttribute ('name')=='recursecustom')
						{ 
							var simp=new SimpleXMLIterator (cs[k],'r','n');
							while (!simp.eof)
							{
								key = 'k' + simp.data['EventID']; 
								if (!Controller.EventDateMask[key]) Controller.EventDateMask[key]=[];
								Controller.EventDateMask[key].push (simp.data['EventDate']);
								
								simp.movenext();
							}
						}
						if (cs[k].getAttribute ('name')=='rooms')
						{ 
							var simp=new SimpleXMLIterator (cs[k],'r','n');
							while (!simp.eof)
							{
								key = 'r' + simp.data['eventfk']; 
								if (!Controller.EventRoomMask[key]) Controller.EventRoomMask[key]=[];
								Controller.EventRoomMask[key].push (simp.data['RoomName']); 
								simp.movenext();
							}
						}
					}
					
					
                    ns=rs[j].getAttribute ('name'); 
                    if (ns=='calendars'||ns=='rooms')
                    {
                        
                    }
                    else
                    {
                  
                        nodes = rs[j].childNodes;  
                        Controller.eventlist = [];
                        
                        d.title="Event List";
                        var f=nodes[1].childNodes;
                        
                        for (var i=0;i<f.length;i++)
                        {
                            try { d.columns.push (f[i].getAttribute ('n')); 
                            } catch (ex) {}
                        } 
                        
                        
                        for (var x=0;x<nodes.length;x++)
                        {
                            if (nodes[x].nodeName=='r')
                            {
                                var row=[];
                                f=nodes[x].childNodes;
                                for (var i=0;i<f.length;i++)
                                {
                                    var fc=f[i].childNodes;
                                    for (var k=0;k<fc.length;k++)
                                    {
                                        row.push ( fc[k].nodeValue );
                                        row[ f[i].getAttribute ('n') ] = fc[k].nodeValue ;
                                    }
                                }
								if (row.CustomDate)
								{
									if (row.EventStartTime)
									{
										var exact_time= new Date (dateUS(row.CustomDate) + ' ' + row.EventStartTime)
										if (!isNaN(exact_time))
										{
											row.ActualDateandTime = exact_time.getTime();
										}
									}
								}
                                Controller.eventlist.push (row); 
                            }
                        } 
                        
                         if (Controller.SortField) Controller.eventlist.sort (SortEventRowByName);
						 else
						 {
							 Controller.SortField='ActualDateandTime';
							 Controller.eventlist.sort (SortEventRowByName);
							 Controller.SortField=null;
						 }
                        window.isbusy = false;
                        d.rows = Controller.eventlist;
                        return d.draw();
                        
                    }
                    return 'Could not find XML data'; 
                } 
            } else alert ('could not load ' + window.http.responseText);
            
        }  
        else
        
        {
        //    return '<table id="dcelisttable" width=500 height=500><tr><td align=center><img src="/webservices/images/explorer/chrome_throbber_fast_16.gif"><br><label style=color:gray disabled>Please wait...</label></td></tr></table>';
            
        //    alert ( 'readyState: ' + window.http.readyState + "-" + new Date()  );
            return '<small style=color:gray>' + new Date() + '</small>';
        }
}



function SortEventRowByName(a,b)
{
    return a[Controller.SortField] < b[Controller.SortField] ? -1 : 1;
}


function BeforeEventListRender()
{
    window.resizer.clear();
    refreshCalendars ();
    var dz=getElement ('dcal');
    if (dz)dz.style.display='none';
}

function OnEventListRender ()
{


    var event = Controller.QueryString['key'];
   // confirm (Controller.createQueryString ())
    if (event)
    { //confirm ('loading event' + event);
        return EventDataGridEdit(null, event);	        
    }
    
    var setting, lense, view = Controller.QueryString['view'];
    if (view && view != 'eventlist')
    { 
        if (lense = GetViewFunctionFromURL (location.href))
        { //confirm ('loading view ' + view);
            return lense ();
        }   
    }  


    var dx=getElement ('elisttable');
    var dc=getElement ('dcelisttable');
    var dz=getElement ('dcal');
    if (dz)dz.style.display='none';
    if (window.http.readyState==ReadyState.DONE && Controller.SidebarState==1)
    {
        if (dz)dz.style.display='inline';
    }
    window.resizer.clear ();
    if (dc)
    {
        dc.invoke = function ()
        { 
            this.style.height = window_h() - docy (this) - 65;
            this.style.width = window_w() - (Controller.SidebarState==1?176:20);
        }
        window.resizer.subscribe (dc);
        dc.invoke();
    } 
    
    var dx = document.getElementsByTagName ("SPAN");// alert (dx.length)
    for (var x=0;x<dx.length;x++)
    {
        if (dx[x].className=='magicspan')
        {
            dx[x].invoke = function ()
            {
                var w=window_w() - docx(this) - 275;
                var len = w/10;
                len = Math.max (len,1);
                this.innerHTML = ' - ' + this.title.substr(0,len) + (this.title.length > len ? '...' : '');
                this.style.color = '#666';
            }
            window.resizer.subscribe (dx[x]);
            dx[x].invoke();
        }
    }                                
    if (window.http.readyState == ReadyState.DONE)                                              
    {       
        CheckForMailRequest (); 
    }          
    window.resizer.invoke ();
}
   

function EventDataGridSelect (gridid, eventid)  
{   
    var dw=getElement ('dworkspace');      
    var dg=window.datagrids[gridid];  
    dg.selected=eventid;  
    dw.innerHTML=dg.draw();  
    DebugEventDataGrid.afterinvoke ();  
    InvoicePageView.afterinvoke ();
}  


function EventDataGridChangeReport (id)  
{   
    window.report=id; 
    HomePageEvent.invoke ();   
}  


function EventDataGridChangeMode (view)  
{    
    window.gridview	= view; 
	window.report 	= null;
    HomePageEvent.invoke ();  
}  


function EventDataGridChangeRange (gridid)  
{    
    var dw=getElement ('dworkspace');      
    var dg=window.datagrids[gridid];  
    dg.showall=!dg.showall;  
    dw.innerHTML=dg.draw();  
    DebugEventDataGrid.afterinvoke ();  
}   

function EventCreateNew ()  
{  
    var x=EventObject.empty();  
    window.currentevent = new EventObject(x, -1, -1, -1);  
    EventDetailEvent.invoke();          
}  

function EventDataGridPage (gridid, pagenum)  
{   
    var dw=getElement ('dworkspace');      
    var dg=window.datagrids[gridid];  
    dg.page=pagenum;  
    dw.innerHTML=dg.draw();  
    DebugEventDataGrid.afterinvoke ();  
}  
function EventDataGridSize (gridid, sz)  
{   
    var dw=getElement ('dworkspace');      
    var dg=window.datagrids[gridid];  
    dg.pagesize=parseInt(sz);  
    dw.innerHTML=dg.draw();  
    DebugEventDataGrid.afterinvoke ();  
}   




var EventListNormalRow = '<tr'; 
EventListNormalRow += '>'; 
EventListNormalRow += '<td width="16" class=(class) '; 
EventListNormalRow += 'style="border-left:solid 2px #ffffff"'; 
EventListNormalRow += '><input type=checkbox value="(ID)" class="bulk"></td>';
EventListNormalRow += '<td width="20" class=(class) ';  
EventListNormalRow += '>';  
EventListNormalRow += '<a title="Set as featured event" href="javascript:void(0)" ';
EventListNormalRow += ' onclick="ToggleFeaturedValue ((gridid), (ID), (other))">';  
EventListNormalRow += '<img border=0 src="(star)">';  
EventListNormalRow += '</a>';
EventListNormalRow += '</td>';
EventListNormalRow += '<td class=(class) style="cursor:hand" nowrap';
EventListNormalRow += '>';
EventListNormalRow += '<a href="(href)"  style="color:#003366">'; 
//EventListNormalRow += '<a href="javascript:void(0)" style="color:#003366" onclick="EventDataGridEdit ((gridid), (ID))" >'; 
EventListNormalRow += '(EventName)';
EventListNormalRow += '</a>';
EventListNormalRow += '<span class=magicspan title=" in (RoomName) (Comments)">';
EventListNormalRow += '<font color="gray">(shortcomment)</font></span>';
EventListNormalRow += '</td><td class=(class) align="left" ';
EventListNormalRow += ' nowrap ';
EventListNormalRow += ' width="50"><font color="gray">(EventStartTime)</font>&nbsp;';
EventListNormalRow += '</td>';
EventListNormalRow += '<td class=(class) align="left" ';
EventListNormalRow += ' nowrap ';
EventListNormalRow += ' width="75"><font color="gray">(EventEndTime)</font>&nbsp;';
EventListNormalRow += '</td>';
EventListNormalRow += '<td class=(class) align="left" ';
EventListNormalRow += ' nowrap ';
EventListNormalRow += ' width="180">';
EventListNormalRow += '<font color="gray">(EventDate)</font>&nbsp;'; 
EventListNormalRow += ' - <font color="gray">(RecurseEndDate)';
EventListNormalRow += '</font>&nbsp;</td>';
EventListNormalRow += '<td class=(class) ';
EventListNormalRow += 'style="border-right:solid 2px #ffffff"'; 
EventListNormalRow += '>';
EventListNormalRow += '<a title="View event details" href="javascript:void(0)"';
EventListNormalRow += ' onclick="EventDataGridSelect((gridid),(ID))">';
EventListNormalRow += '<img border="0" src="http://www.google.com/reader/ui/3691591653-go-to-small.gif">';
EventListNormalRow += '</a>';
EventListNormalRow += '</td>';
EventListNormalRow += '</tr>';  





var cspan = 7;

var EventListSelectedRow = '';
EventListSelectedRow += '<tr';
EventListSelectedRow += ' bgcolor="#CCDDFF" ';
EventListSelectedRow += '>'; 
EventListSelectedRow += '<td width="16" class=(class) '; 
EventListSelectedRow += 'style="border-left:solid 2px #6699cc"'; 
EventListSelectedRow += '><input type=checkbox value="(ID)" class="bulk"></td>';
EventListSelectedRow += '<td width="20" class=(class) ';  
EventListSelectedRow += '>';  
EventListSelectedRow += '<a title="Set as featured event" href="javascript:void(0)" ';
EventListSelectedRow += ' onclick="ToggleFeaturedValue ((gridid), (ID), (other))">';  
EventListSelectedRow += '<img border=0 src="(star)">';  
EventListSelectedRow += '</a>';
EventListSelectedRow += '</td>';
EventListSelectedRow += '<td class=(class) style="cursor:hand" nowrap';
EventListSelectedRow += '>';
EventListSelectedRow += '<a href="(href)">'; 
EventListSelectedRow += '(EventName)';
EventListSelectedRow += '</a>';
EventListSelectedRow += '<span class=magicspan title=" in (RoomName) (Comments)">';
EventListSelectedRow += '<font color="gray">(shortcomment)</font></span>';
EventListSelectedRow += '</td><td class=(class) align="left" ';
EventListSelectedRow += ' nowrap ';
EventListSelectedRow += ' width="50"><font color="gray">(EventStartTime)</font>&nbsp;';
EventListSelectedRow += '</td>';
EventListSelectedRow += '<td class=(class) align="left" ';
EventListSelectedRow += ' nowrap ';
EventListSelectedRow += ' width="75"><font color="gray">' + ' - (EventEndTime)</font>&nbsp;';
EventListSelectedRow += '</td>';
EventListSelectedRow += '<td class=(class) align="left" ';
EventListSelectedRow += ' nowrap ';
EventListSelectedRow += ' width="180">';
EventListSelectedRow += '<font color="gray">(EventDate)</font>&nbsp;'; 
EventListSelectedRow += ' - <font color="gray">(RecurseEndDate)'; 
EventListSelectedRow += '<td class=(class) ';
EventListSelectedRow += 'style="border-right:solid 2px #6699cc"';
EventListSelectedRow += '>';
EventListSelectedRow += '<a title="View event details" href="(href)">';
EventListSelectedRow += '<img border="0" src="http://www.google.com/reader/ui/3691591653-go-to-small.gif">';
EventListSelectedRow += '</a>';
EventListSelectedRow += '</td>';
EventListSelectedRow += '</tr>';    
EventListSelectedRow += '<tr>'; 
EventListSelectedRow += '<td colspan=(cspan) class=datarow '; 
EventListSelectedRow += 'style="padding:5px'; 
EventListSelectedRow += ';border-left:solid 2px #6699cc'; 
EventListSelectedRow += ';border-right:solid 2px #6699cc'; 
EventListSelectedRow += '"'; 
EventListSelectedRow += ' valign="top">';   
EventListSelectedRow += '<table width="100%">'; 
EventListSelectedRow += '<tr>'; 
EventListSelectedRow += '<td width="50%" valign="top">'; 
EventListSelectedRow += '<div style="margin-left:0px;color:blue;cursor:hand" '; 
EventListSelectedRow += ' onclick="EventDataGridEdit((gridid),(ID))"'; 
EventListSelectedRow += '><!--<a href="(href)">(EventName)</a>-->';  
EventListSelectedRow += '<div style="font-weight:normal">'; 
EventListSelectedRow += '<font size="2" color=gray> in <font size="3" color=blue>(RoomName)</font>';  
EventListSelectedRow += ' (FullName)';  

EventListSelectedRow += '(CreateDate)'

EventListSelectedRow += '<br>(ApproveLogin)';  
EventListSelectedRow += ' (ApproveDate)' 
EventListSelectedRow += '</font>'; 
EventListSelectedRow += '</div>'; 
EventListSelectedRow += '</div>'; 
EventListSelectedRow += '</td>';

EventListSelectedRow += '<td width="50%" valign="top">'; 
EventListSelectedRow += '(Calendarscope)<br>'; 
EventListSelectedRow += '<div class="small">(SetupStartTime)(SetupEndTime)(Duration)(Attendees)</div>'; 
 
EventListSelectedRow += '</td>';
EventListSelectedRow += '</tr>';
EventListSelectedRow += '</table>'; 

EventListSelectedRow += '<div>(Comments)</div>'; 
//EventListSelectedRow += ' (Description)'; 
 


EventListSelectedRow += '</td>'; 
EventListSelectedRow += '</tr>'; 
EventListSelectedRow += '<tr>'; 
EventListSelectedRow += '<td colspan=(cspan) class=datarow bgcolor="gainsboro" '; 
EventListSelectedRow += 'style="padding:2px'; 
EventListSelectedRow += ';border-left:solid 2px #6699cc'; 
EventListSelectedRow += ';border-right:solid 2px #6699cc'; 
EventListSelectedRow += ';border-bottom:solid 2px #6699cc'; 
EventListSelectedRow += '"'; 
EventListSelectedRow += '>'; 
EventListSelectedRow += '&nbsp;'; 
//EventListSelectedRow += '<img align=absmiddle border=0 src="/webservices/images/explorer/i.p.folder.drafts.gif">'; 
//EventListSelectedRow += ' <a title="Edit this event" href="javascript:void(0)"'; 
//EventListSelectedRow += ' class=small onclick="EventDataGridEdit((gridid),(ID))"'; 
//EventListSelectedRow += '>Edit this event</a>'; 
//EventListSelectedRow += '&nbsp;'; 
//EventListSelectedRow += '<img align=absmiddle border=0 src="/webservices/images/explorer/note_icon.gif">'; 
//EventListSelectedRow += ' <a title="View log entries for this event" href="javascript:void(0)"'; 
//EventListSelectedRow += ' class=small onclick="OpenEventLog((ID))"'; 
//EventListSelectedRow += '>View event log</a>'; 


EventListSelectedRow += '</td>'; 
EventListSelectedRow += '</tr>';  

